Methods and systems for flow-based coarsening of reservoir grid models

ABSTRACT

A method may include obtaining model data for a reservoir region of interest. The model data may include flow property data based on streamlines. The method may further include generating a multilevel coarsening mask describing various coarsening levels that correspond to different flow values among the flow property data. The method may further include generating a coarsened grid model using the model data and the multilevel coarsening mask. The method may further include performing a reservoir simulation of the reservoir region of interest using the coarsened grid model.

BACKGROUND

In a coarsened model, properties for various cells may be averaged in aprocess called up scaling. However, if not applied properly upscalingmay provide a solution in the coarsened model that may lose accuracy asthe details are lost in the averaging process, especially wherecoarsening is applied to highly influential grid-cells. Thus, accuratesimulations may require a coarsened model that reduces the computationaltime to a reasonable speed while also preserving relevant physicalrelationships in the underlying data.

SUMMARY

This summary is provided to introduce a selection of concepts that arefurther described below in the detailed description. This summary is notintended to identify key or essential features of the claimed subjectmatter, nor is it intended to be used as an aid in limiting the scope ofthe claimed subject matter.

In general, in one aspect, embodiments relate to a method that includesobtaining, by a computer processor, model data for a reservoir region ofinterest. The model data includes flow property data based onstreamlines. The method further includes generating, by the computerprocessor, a multilevel coarsening mask describing various coarseninglevels that correspond to different flow values among the flow propertydata. The method further includes generating, by the computer processor,a coarsened grid model using the model data and the multilevelcoarsening mask. The method further includes performing, by the computerprocessor, a reservoir simulation of the reservoir region of interestusing the coarsened grid model.

In general, in one aspect, embodiments relate to a computer system thatincludes a processor and a memory coupled to the processor. The memoryincludes functionality for obtaining model data for a reservoir regionof interest. The model data includes flow property data based onstreamlines. The memory further includes functionality for generating amultilevel coarsening mask describing various coarsening levels thatcorrespond to different flow values among the flow property data. Thememory further includes functionality for generating a coarsened gridmodel using the model data and the multilevel coarsening mask. Thememory further includes functionality for performing a reservoirsimulation of the reservoir region of interest using the coarsened gridmodel.

In general, in one aspect, embodiments relate to non-transitory computerreadable medium storing instructions executable by a computer processor.The instructions obtain model data for a reservoir region of interest.The model data includes flow property data based on streamlines. Theinstructions further generate a multilevel coarsening mask describingvarious coarsening levels that correspond to different flow values amongthe flow property data. The instructions further generate a coarsenedgrid model using the model data and the multilevel coarsening mask. Theinstructions further perform a reservoir simulation of the reservoirregion of interest using the coarsened grid model.

Other aspects and advantages of the claimed subject matter will beapparent from the following description and the appended claims.

BRIEF DESCRIPTION OF DRAWINGS

Specific embodiments of the disclosed technology will now be describedin detail with reference to the accompanying figures. Like elements inthe various figures are denoted by like reference numerals forconsistency.

FIGS. 1, 2A, 2B, 3, and 4 show systems in accordance with one or moreembodiments.

FIGS. 5 and 6 show flowcharts in accordance with one or moreembodiments.

FIGS. 7, 8A, 8B, and 8C show examples in accordance with one or moreembodiments.

FIG. 9 shows a flowchart in accordance with one or more embodiments.

FIGS. 10, 11A, and 11B show examples in accordance with one or moreembodiments.

FIG. 12 shows a flowchart in accordance with one or more embodiments.

FIGS. 13A, 13B, 14A, 14B, and 14C show examples in accordance with oneor more embodiments.

FIG. 15 shows a flowchart in accordance with one or more embodiments.

FIGS. 16, 17A, 17B, and 17C show examples in accordance with one or moreembodiments.

FIG. 18 shows a computing system in accordance with one or moreembodiments.

DETAILED DESCRIPTION

In the following detailed description of embodiments of the disclosure,numerous specific details are set forth in order to provide a morethorough understanding of the disclosure. However, it will be apparentto one of ordinary skill in the art that the disclosure may be practicedwithout these specific details. In other instances, well-known featureshave not been described in detail to avoid unnecessarily complicatingthe description.

Throughout the application, ordinal numbers (e.g., first, second, third,etc.) may be used as an adjective for an element (i.e., any noun in theapplication). The use of ordinal numbers is not to imply or create anyparticular ordering of the elements nor to limit any element to beingonly a single element unless expressly disclosed, such as using theterms “before”, “after”, “single”, and other such terminology. Rather,the use of ordinal numbers is to distinguish between the elements. Byway of an example, a first element is distinct from a second element,and the first element may encompass more than one element and succeed(or precede) the second element in an ordering of elements.

In general, embodiments of the disclosure include systems and methodsfor using various algorithms to coarsen a fine-grid model to increaseperformance of a reservoir simulator. For example, some embodiments aredirected to using image processing techniques preserve flow propertiesof a reservoir region. In some embodiments, streamline simulationsprovide the framework for generating an underlying coarsening mask.Likewise, some embodiments use decomposition algorithms or combinatorialalgorithms to further mitigate various burdens on a reservoir simulatorto produce a coarsened grid model.

Turning to FIG. 1, FIG. 1 shows a schematic diagram in accordance withone or more embodiments. As shown in FIG. 1, FIG. 1 illustrates a wellenvironment (100) that includes a hydrocarbon reservoir (“reservoir”)(102) located in a subsurface hydrocarbon-bearing formation(“formation”) (104) and a well system (106). The hydrocarbon-bearingformation (104) may include a porous or fractured rock formation thatresides underground, beneath the earth's surface (“surface”) (108). Inthe case of the well system (106) being a hydrocarbon well, thereservoir (102) may include a portion of the hydrocarbon-bearingformation (104). The hydrocarbon-bearing formation (104) and thereservoir (102) may include different layers of rock having varyingcharacteristics, such as varying degrees of permeability, porosity, andresistivity. In the case of the well system (106) being operated as aproduction well, the well system (106) may facilitate the extraction ofhydrocarbons (or “production”) from the reservoir (102).

In some embodiments, the well system (106) includes a wellbore (120), awell sub-surface system (122), a well surface system (124), and a wellcontrol system (“control system”) (126). The control system (126) maycontrol various operations of the well system (106), such as wellproduction operations, well completion operations, well maintenanceoperations, and reservoir monitoring, assessment and developmentoperations. In some embodiments, the control system (126) includes acomputer system that is the same as or similar to that of computingsystem (1700) described below in FIG. 17 and the accompanyingdescription.

The wellbore (120) may include a bored hole that extends from thesurface (108) into a target zone of the hydrocarbon-bearing formation(104), such as the reservoir (102). An upper end of the wellbore (120),terminating at or near the surface (108), may be referred to as the“up-hole” end of the wellbore (120), and a lower end of the wellbore,terminating in the hydrocarbon-bearing formation (104), may be referredto as the “down-hole” end of the wellbore (120). The wellbore (120) mayfacilitate the circulation of drilling fluids during drillingoperations, the flow of hydrocarbon production (“production”) (121)(e.g., oil and gas) from the reservoir (102) to the surface (108) duringproduction operations, the injection of substances (e.g., water) intothe hydrocarbon-bearing formation (104) or the reservoir (102) duringinjection operations, or the communication of monitoring devices (e.g.,logging tools) into the hydrocarbon-bearing formation (104) or thereservoir (102) during monitoring operations (e.g., during in situlogging operations).

In some embodiments, during operation of the well system (106), thecontrol system (126) collects and records wellhead data (140) for thewell system (106). The wellhead data (140) may include, for example, arecord of measurements of wellhead pressure (P_(wh)) (e.g., includingflowing wellhead pressure), wellhead temperature (T_(wh)) (e.g.,including flowing wellhead temperature), wellhead production rate(Q_(wh)) over some or all of the life of the well (106), and water cutdata. In some embodiments, the measurements are recorded in real-time,and are available for review or use within seconds, minutes or hours ofthe condition being sensed (e.g., the measurements are available within1 hour of the condition being sensed). In such an embodiment, thewellhead data (140) may be referred to as “real-time” wellhead data(140). Real-time wellhead data (140) may enable an operator of the well(106) to assess a relatively current state of the well system (106), andmake real-time decisions regarding development of the well system (106)and the reservoir (102), such as on-demand adjustments in regulation ofproduction flow from the well.

In some embodiments, the well surface system (124) includes a wellhead(130). The wellhead (130) may include a rigid structure installed at the“up-hole” end of the wellbore (120), at or near where the wellbore (120)terminates at the Earth's surface (108). The wellhead (130) may includestructures for supporting (or “hanging”) casing and production tubingextending into the wellbore (120). Production (121) may flow through thewellhead (130), after exiting the wellbore (120) and the wellsub-surface system (122), including, for example, the casing and theproduction tubing. In some embodiments, the well surface system (124)includes flow regulating devices that are operable to control the flowof substances into and out of the wellbore (120). For example, the wellsurface system (124) may include one or more production valves (132)that are operable to control the flow of production (134). For example,a production valve (132) may be fully opened to enable unrestricted flowof production (121) from the wellbore (120), the production valve (132)may be partially opened to partially restrict (or “throttle”) the flowof production (121) from the wellbore (120), and production valve (132)may be fully closed to fully restrict (or “block”) the flow ofproduction (121) from the wellbore (120), and through the well surfacesystem (124).

Keeping with FIG. 1, in some embodiments, the well surface system (124)includes a surface sensing system (134). The surface sensing system(134) may include sensors for sensing characteristics of substances,including production (121), passing through or otherwise located in thewell surface system (124). The characteristics may include, for example,pressure, temperature and flow rate of production (121) flowing throughthe wellhead (130), or other conduits of the well surface system (124),after exiting the wellbore (120).

In some embodiments, the surface sensing system (134) includes a surfacepressure sensor (136) operable to sense the pressure of production (151)flowing through the well surface system (124), after it exits thewellbore (120). The surface pressure sensor (136) may include, forexample, a wellhead pressure sensor that senses a pressure of production(121) flowing through or otherwise located in the wellhead (130). Insome embodiments, the surface sensing system (134) includes a surfacetemperature sensor (138) operable to sense the temperature of production(151) flowing through the well surface system (124), after it exits thewellbore (120). The surface temperature sensor (138) may include, forexample, a wellhead temperature sensor that senses a temperature ofproduction (121) flowing through or otherwise located in the wellhead(130), referred to as “wellhead temperature” (T_(wh)). In someembodiments, the surface sensing system (134) includes a flow ratesensor (139) operable to sense the flow rate of production (151) flowingthrough the well surface system (124), after it exits the wellbore(120). The flow rate sensor (139) may include hardware that senses aflow rate of production (121) (Q_(wh)) passing through the wellhead(130).

In some embodiments, the well system (106) includes a reservoirsimulator (160). For example, the reservoir simulator (160) may includehardware and/or software with functionality for generating one or morereservoir models regarding the hydrocarbon-bearing formation (104)and/or performing one or more reservoir simulations. For example, thereservoir simulator (160) may store well logs and data regarding coresamples for performing simulations. A reservoir simulator may furtheranalyze the well log data, the core sample data, seismic data, and/orother types of data to generate and/or update the one or more reservoirmodels. While the reservoir simulator (160) is shown at a well site,embodiments are contemplated where reservoir simulators are located awayfrom well sites. In some embodiments, the reservoir simulator (160) mayinclude a computer system that is similar to the computing system (1700)described below with regard to FIG. 17 and the accompanying description.

Turning to FIG. 2A, FIG. 2A shows a schematic diagram in accordance withone or more embodiments. As illustrated in FIG. 2A, FIG. 2A shows ageological region (200) that may include one or more reservoir regions(e.g., reservoir region (230)) with various production wells (e.g.,production well A (211), production well (212)). For example, aproduction well may be similar to the well system (106) described abovein FIG. 1 and the accompanying description. Likewise, a reservoir regionmay also include one or more injection wells (e.g., injection well C(216)) that include functionality for enhancing production by one ormore neighboring production wells. As shown in FIG. 2A, wells may bedisposed in the reservoir region (230) above various subsurface layers(e.g., subsurface layer A (241), subsurface layer B (242)), which mayinclude hydrocarbon deposits. In particular, production data and/orinjection data may exist for a particular well, where production datamay include data that describes production or production operations at awell, such as wellhead data (142) described in FIG. 1 and theaccompanying description.

Turning to FIG. 2B, FIG. 2B shows a schematic diagram in accordance withone or more embodiments. As illustrated in FIG. 2B, FIG. 2B shows areservoir grid model (290) that corresponds to the geological region(200) from FIG. 2A. More specifically, the reservoir grid model (290)includes grid cells (261) that may refer to an original cell of areservoir grid model as well as coarsened grid blocks (262) that mayrefer to an amalgamation of original cells of the reservoir grid model.For example, a grid cell may be the case of a 1×1 block, where coarsenedgrid blocks may be of sizes 2×2, 4×4, 8×8, etc. Both the grid cells(261) and the coarsened grid blocks (262) may correspond to columns formultiple model layers (260) within the reservoir grid model (290).

Prior to performing a reservoir simulation, local grid refinement andcoarsening (LGR) may be used to increase or decrease grid resolution ina certain area of reservoir grid model. For example, various reservoirproperties, e.g., permeability, porosity or saturations, may correspondto a discrete value that is associated with a particular grid cell orcoarsened grid block. However, by using discrete values to represent aportion of a geological region, a discretization error may occur in areservoir simulation. Thus, finer grids may reduce discretization errorsas the numerical approximation of a finer grid is closer to the exactsolution, however through a higher computational cost. As shown in FIG.2B, for example, the reservoir grid model (290) may include variousfine-grid models (i.e., fine-grid model A (251), fine-grid model B(252)), that are surrounded by coarsened block regions. Likewise, theoriginal reservoir grid model without any coarsening may also be afine-grid model.

In some embodiments, proxy models or reduced-order models may begenerated for performing a reservoir simulation. For example, one way toreduce model dimensionality is to reduce the number of grid blocksand/or grid cells. By averaging reservoir properties into larger blockswhile preserving the flow properties of a reservoir model, computationaltime of a reservoir simulation may be reduced. In general, coarseningmay be applied to cells that do not contribute to a total flow within areservoir region because a slight change on such reservoir propertiesmay not affect the output of a simulation. Accordingly, different levelsof coarsening may be used on different regions of the same reservoirmodel. As such, a coarsening ratio may correspond to a measure ofcoarsening efficiency, which may be defined as a total number of cellsin a coarsened reservoir model divided by the original number of cellsin the original reservoir model.

In some embodiments, a reservoir grid model may be adjusted to reducethe load of an individual simulation run such as through cropping theoriginal grid model and running the cropped models independently,dividing a grid model into sector models and running them independently,or coarsening and upscaling the original grid model. In cropped models,the original model is separated into smaller ones without retaining theflow properties at various boundaries within the model. By ignoring theflow properties and thus the interaction between the separated parts ofthe reservoirs, inaccuracies may be introduced into simulation runs withthe cropped model. In sector modeling, the grid model may be dividedinto smaller models while storing the flow properties on variousboundaries over time, but using boundary flux may be a time consumingtask. If there are significant changes in the grid model outside thearea of interest the flow properties may be updated through a simulationof a fine-grid model. Flow properties, such as flux, may be defined as areservoir fluid (e.g., oil or water) that flows between any two gridblocks. Likewise, grid cells or blocks may be upscaled in a method thatreduces the computational demand on running simulations using fewer gridcells. However, a grid model may lose accuracy in a reservoir simulationif the underlying properties differ too much from the original fine-gridmodel.

Turning to FIG. 3, FIG. 3 shows a schematic diagram in accordance withone or more embodiments. In FIG. 3, a flux map (e.g., flux map Z (300))describes various flow properties between various productions wells(i.e., production well A (311), production well B (312), production wellC (313)) and an injection well (injection well X (315)) within areservoir region. For example, the flux map Z (300) includes variousstreamlines (e.g., streamlines Z (320)) that may be generated during oneor more reservoir simulations of the reservoir region. In particular,streamlines may be field lines instantaneously tangent to a fluidvelocity field that provide a representation of reservoir connectivity.As such, streamlines may be an alternative to cell-based grid modelingtechniques in reservoir simulations, where a streamline output from areservoir simulator may include a snapshot of an instantaneous flowfield in a geological region. Streamlines may be beneficial inunderstanding the boundaries of one or more well drainage volumes (e.g.,a drainage volume may correspond to drainage area A (331), drainage areaB (332), and/or drainage area C (333)) in a reservoir region. Likewise,individual streamlines may describe flow properties of a production well(e.g., production well A (311), production well B (312), production wellC (313)) or an injection well (e.g., injection well X (315)).

In some embodiments, a reservoir simulator may transform a reservoirgrid model into a number of flow paths of nominally constant fluxsimilar to the flux map Z (300) shown in FIG. 3. While flow paths may bethree-dimensional, the flow paths may be solved independently asessentially one-dimensional problems. Since a streamline may operateindependently of other streamlines in the reservoir region, streamlinesmay be treated as a quasi-orthogonal basis set that describes a totalflow of injected fluids into a flow path. Thus, streamline simulationsmay provide reservoir engineering information, such as theidentification of waterflood patterns, well pair connections betweeninjection wells and production wells, and areas of flood inefficiency.By calculating interwell multiphase fluxes using streamlines, forexample, streamline simulations may identify how much oil productioncomes from the pressure support from a certain injection well. With thisstreamline information, injection rates and/or production rates may beadjusted in order to reduce water cycling, increase oil recovery, and/orimprove flood management. Likewise, using a reservoir grid model andpre-injection data, a forward solution of an impact of fluid injectedalong a streamline may be determined independently. The results may bemapped back onto the original grid model to update fluid compositions asa function of time as well as indicate appropriate porosity andpermeability changes in the underlying reservoir grid model.

Turning to FIG. 4, FIG. 4 shows a schematic diagram in accordance withone or more embodiments. In FIG. 4, a multilevel coarsening mask (e.g.,multilevel coarsening mask X (400)) describes various coarsening levelsand/or refinement levels of a reservoir grid model. In some embodiments,a reservoir simulator uses a multilevel coarsening mask to labeloriginal cells in a reservoir grid model according to their respectivecoarsening or refinement levels for generating a particular coarsenedgrid model. In particular, these labels may correspond to variouscoarsening levels for original cells. In some embodiments, a multilevelcoarsening mask is generated from multiple binary masks that specifyareas where refinement or coarsening is desired in a reservoir gridmodel. In another embodiment, a multilevel coarsening mask may beseparated into multiple binary masks that correspond to respectivecoarsening and/or refinement levels, e.g., to perform individualprocessing on cells within a respective coarsening level.

A binary mask may be an image or other dataset that is defined accordingto ‘1’ and ‘0’s, or any other binary integer set. For example, a ‘1’ ina binary mask may correspond to a coarsening level of 8×8 cells for therespective coarsened grid block, while a ‘0’ identifies a cell or blockthat is left unchanged during the coarsening process. For example, abinary mask may be obtained by a logical operator applied to a static ordynamic property, e.g. oil saturation, total flux, faults, facies, etc.,within cells or blocks of a reservoir grid model. In some embodiments,coarsened grid blocks are squared with the side length of a coarsenedgrid block being a power of 2 (that is, 1, 2, 4, 8, etc.).

Keeping with FIG. 4, the multilevel coarsening mask X (400) includesvarious coarsening levels (i.e., coarsening level A (420), coarseninglevel B (430), and coarsening level C (440)) and various fine-gridregions (i.e., fine-grid region A (411), fine-grid region B (412), andfine-grid region C (413)). Where the fine-grid regions correspond tooriginal cells in a reservoir grid model, coarsening level A (420)corresponds to coarsened grid blocks of a 2×2 size. Likewise, coarseninglevel B (430) and coarsening level C (440) correspond to coarsened gridblocks of a 4×4 size and an 8×8 size, respectively. Thus, the propertyresolution (490) of the multilevel coarsening mask Z (400) ranges from afine-grid resolution that matches original grid cells to a maximumcoarsening level at coarsening level C (440).

In some embodiments, a multilevel coarsening mask is generated using acoarsening/refinement algorithm. For example, a coarsening/refinementalgorithm may define a series of LGR statements which identify one ormore box-like cell regions within a reservoir grid model and an outputnumber of grid blocks. For simplicity sake, an “LGR array” refers to thecells or blocks associated with an “LGR statement,” e.g., cells orblocks within a coarsening mask, while an “LGR statement” refers to thecomputer instruction provided to a reservoir simulator for generating acoarsened grid model. Thus, a particular coarsened grid block in thecoarsened grid model corresponds to the LGR array. In some embodiments,LGR statements may have a unique name identifier and a corresponding LGRdefinition. An example of an LGR statement is found below:

-   -   LGR_Array1 I1: 1, I2: 8, J1: 1, J2: 8, NI: 1, NJ: 1        where LGR_Array1 represents a unique identifier for the LGR        statement and the following string of LGR_Array1 represents a        respective LGR array of cells within a reservoir grid model,        where I1 and I2 are the original LGR coordinates in the        I-direction of a grid, J1 and J2 define the range in the        J-direction of the grid. After defining the respective LGR        array, NI and NJ define the block size of the respective LGR        array in the resulting grid model. This LGR statement may        produce a unique mapping between an output cell in the resulting        grid model and the original grid model based on the unique        identifier of the LGR statement. Automated tools in a reservoir        simulator may produce small-sized “elementary” LGR statements        which may result in a very large number of LGR statements (e.g.,        hundreds of thousands of LGR arrays for a coarsened grid model).        LGR statements may be written to a computer program file and        then read by a reservoir simulator during the re-gridding phase        and as an input property for a reservoir simulation.

Turning to FIG. 5, FIG. 5 shows a flowchart in accordance with one ormore embodiments. Specifically, FIG. 5 describes a general method forsimulating a reservoir region of interest using a well assignment. Oneor more blocks in FIG. 5 may be performed by one or more components(e.g., reservoir simulator (160)) as described in FIGS. 1, 2B, and 4.While the various blocks in FIG. 5 are presented and describedsequentially, one of ordinary skill in the art will appreciate that someor all of the blocks may be executed in different orders, may becombined or omitted, and some or all of the blocks may be executed inparallel. Furthermore, the blocks may be performed actively orpassively.

In Block 500, model data is obtained from a grid model for a reservoirregion of interest in accordance with one or more embodiments. Forexample, a reservoir simulator may access model data in a fine-gridmodel, where the model data includes various reservoir property values,such as oil saturation, water saturation, porosity, permeability, etc.The reservoir region of interest may correspond to a portion of ageological region selected for running simulations and further analysis.For example, the reservoir region of interest may be similar togeological region (200) or reservoir region (230) described above inFIG. 2A and the accompanying description.

In Block 510, a property mask is generated from model data in accordancewith one or more embodiments. For example, a reservoir simulator mayperform one or more logical operations on one or more selected reservoirproperties within model data to generate a property mask. Morespecifically, the selected reservoir properties may be static gridproperties coming from a reservoir grid model or dynamic grid propertiescoming from one or more previous reservoir simulations. Likewise, aproperty mask may include other features such as wells/perforations andfractures. In some embodiments, the property mask is obtained fromstreamlines and flow property information (e.g., time of flight). Formore information on streamlines, see FIG. 3 above and the accompanydescription as well as the section below titled “System and Method forFlow-Based Coarsening of Reservoir Grid Models” below.

In some embodiments, this property mask may be obtained by imposing apredetermined threshold on one or more reservoir properties, e.g. oilsaturation, total flux, fault activity, etc. Reservoir properties may becontinuous and thus the output property mask using one or morepredetermined thresholds may include irregular and patchy regions forcoarsening/refinement. Where flow property information based onstreamlines is the basis for a particular property mask, changes to thestreamlines in different simulations may require different propertymasks or later updates to the property mask.

In Block 520, a coarsening mask is generated using a property mask inaccordance with one or more embodiments. In particular, a coarseningmask may be a single level coarsening mask or a multilevel coarseningmask similar to the multilevel coarsening mask X (400) described abovein FIG. 4 and the accompanying description. Likewise, one or moretechnologies may be implemented by a reservoir simulator to generate acoarsening mask. In some embodiment, for example, one or more imageprocessing techniques may be used to transform a property mask into acoarsening mask, such as using the technologies described below in thesection titled “Method for Refining and/or Coarsening a Grid Model usingImage Processing Techniques.”

In Block 530, various local grid refinement and coarsening (LGR)statements are generated using a coarsening mask in accordance with oneor more embodiments. In particular, the LGR statements may refer to theLGR statements described above with respect to FIG. 4 and theaccompanying description. In some embodiments, LGR object statements aregenerated using the coarsening mask in place of LGR statements or inaddition to LGR statements. For more information on generating LGRobject statements, see the section below titled “System and Method forAutomatic Local Grid Refinement using Decomposition Algorithms onCoarsening Masks.” In some embodiments, LGR statements and/or LGR objectstatements are generated using a predetermined coarsening scenarioselected from multiple coarsening scenarios. For more information onselecting coarsening scenarios, see the section below titled “System andMethod for Selecting Coarsening Scenarios for Reservoir Simulations.”

In Block 540, a coarsened grid model is generated using LGR statementsand model data in accordance with one or more embodiments. For moreinformation on generating coarsened grid models, see FIGS. 2A, 2B, and 4above and the accompanying description.

In Block 550, a reservoir simulation is performed using a coarsened gridmodel in accordance with one or more embodiments. For example, areservoir simulator may use model data from the coarsened grid model aswell as well data to solve well equations and reservoir equations. Byusing a coarsened grid model, a reservoir simulator may reduce the totalcomputation time for performing various simulations.

In some embodiments, reservoir simulations may include various types ofreservoir studies, e.g. history matching and field development andoptimization. For example, different types of reservoir simulations mayuse different input parameters that may result in changes to thereservoir grid model data, such as by changing flow patterns andstreamlines.

System and Method for Refining and/or Coarsening a Grid Model UsingImage Processing Techniques

In general, embodiments of the disclosure include systems and methodsthat use various image processing techniques to adjust the coarseningand/or refinement levels within a reservoir grid model. In someembodiments, for example, a reservoir simulator applies various imagefilters to expand and smooth different regions within a property mask.As such, matrix-matrix convolutions may be used to adjust differentregions within a property mask to capture underlying reservoirprocesses. By using image processing techniques, the computational timeis reduced for performing reservoir simulations, while also maintainingaccuracy during the reservoir simulations.

In particular, various image processing techniques may be based onimplementing a convolution kernel with respect to a property mask basedon model data. The convolutional kernel may be a small matrix (e.g., thesize of the matrix may depend on a desired imaging effect) that issuccessively applied to data within the property mask. A generalconvolution equation may be expressed by the following equation:

$\begin{matrix}{{{g\left( {x,y} \right)} = {{\omega*{f\left( {x,y} \right)}} = {\sum\limits_{s = {- a}}^{a}{\sum\limits_{t = {- b}}^{b}{{\omega\left( {s,t} \right)}{f\left( {{x - s},{y - t}} \right)}}}}}},} & {{Equation}\mspace{14mu} 1}\end{matrix}$

where g(x, y) is the filtered image, f(x, y) is the original image, andω is the filter kernel. Every element of the filter kernel may beconsidered by −a≤s≤a and −b≤t≤b.

Furthermore, some embodiments are directed to preserving the originalmodel grid in an area bigger than grid regions initially specified forcoarsening within the property mask. For example, a reservoir simulatormay automatically detect a number of disconnected regions within a maskand subsequently reduce the number of disconnected regions to a desirednumber through expansion of the regions. By doing so, the reservoirsimulator may increase connectivity and minimize sparsity within theresulting coarsened grid model. After generating an expanded propertymask, smoothing operations and lookup operations may be performed on theexpanded property mask to generate a final property mask. In the finalproperty mask, cell property values may be discretized to variouscoarsening levels and refinement levels. This final property mask maythen be used to produce a coarsening mask as well as LGR statements forgenerating a coarsened grid model.

Turning to FIG. 6, FIG. 6 shows a flowchart in accordance with one ormore embodiments. Specifically, FIG. 6 describes a specific method forsimulating a reservoir region of interest using an adjusted propertymask based on image processing techniques. One or more blocks in FIG. 6may be performed by one or more components (e.g., reservoir simulator(160)) as described in FIGS. 1, 2B, and 4. While the various blocks inFIG. 6 are presented and described sequentially, one of ordinary skillin the art will appreciate that some or all of the blocks may beexecuted in different orders, may be combined or omitted, and some orall of the blocks may be executed in parallel. Furthermore, the blocksmay be performed actively or passively.

In Block 600, model data is obtained for a reservoir region of interestin accordance with one or more embodiments. Block 600 may be similar toBlock 500 described above in FIG. 5 and the accompanying description.

In Block 610, a property mask is generated using model data inaccordance with one or more embodiments. Block 610 may be similar toBlock 510 described above in FIG. 5 and the accompanying description.

In Block 620, disconnected grid regions are determined within a propertymask in accordance with one or more embodiments. For example, when aproperty mask is generated using a threshold for a reservoir propertyvalue, some cells above the threshold may be surrounded by adjacentcells below the threshold. From a visual perspective, these disconnectedregions may appear as various amounts of patchiness throughout theproperty mask (see, e.g., FIG. 8A below for an example). However, manycells below the threshold and proximate these disconnected regions mayaffect the accuracy of a reservoir simulation if unduly coarsened. Assuch, a reservoir simulator may calculate the total number ofdisconnected grid regions within the property mask to analyze and/oradjust the property mask.

In Block 630, one or more grid regions are adjusted within a propertymask to produce expanded grid regions in accordance with one or moreembodiments. In order to maintain accuracy with changing propertyconditions, grid regions in an initial property mask may be expanded togenerate a safe zone around the grid regions and remove noise from theproperty mask. In some embodiments, grid region expansion may beperformed using one or more image filters. For example, an image filtermay be applied to a property mask using matrix-matrix convolution toproduce an adjusted property mask to expand one or more grid regions. Inother words, the disconnected grid regions in Block 620 may be increasedin size to include relevant adjacent cells using the image filter.

In some embodiments, a reservoir simulator uses a normalized blur filteron a property mask. In particular, the normalized blur filter maycorrespond to a general N×N matrix. For example, a 3×3 normalized boxblur filter ω_(BB) may be used to produce a grid region expansion, wherethe normalized box blur filter may be expressed by the followingequation:

$\begin{matrix}{\omega_{BB} = {\frac{1}{9}\begin{pmatrix}1 & 1 & 1 \\1 & 1 & 1 \\1 & 1 & 1\end{pmatrix}}} & {{Equation}\mspace{14mu} 2}\end{matrix}$

Furthermore, this normalized box blur filter may perform an expansionoperation that replaces each cell within a property mask by an averageof the surrounding kernel cells. The kernel size of the filter may be amatrix of NB×NB, where NB is a predetermined value selected by a user orautomatically determined by a reservoir simulator. The resultingadjusted property mask may have values that range between 0 and 1. Assuch, a binary operator may be applied subsequently to the adjustedproperty mask to output a binary mask for further processing.

In some embodiments, a kernel size of a box blur filter may be adjustedautomatically based on the number of disconnected regions in theproperty mask. For example, where the initial property mask has a totalof 16 disconnected grid regions, the kernel size may beautomatically/recursively increased until the number of disconnectedgrid regions is below a predetermined threshold in the resultingproperty mask.

In Block 640, an edge smoothing operation is performed on one or moreexpanded grid regions in accordance with one or more embodiments. Aftera grid region expansion, edges of the resulting grid regions may besoftened to ensure a smooth transition zone and minimize discretizationerrors in the coarsened grid model. Thus, in some embodiments, asmoothed property mask is generated with one or more transition zonesusing an edge smoothing operation. A transition zone may be disposedbetween grid regions with a maximum coarsening level and grid regionswith maximum refinement (e.g., original cells).

Furthermore, the edge smoothing operation may include applying one ormore image filters to the adjusted property mask from Block 630. Theimage filter may be a Gaussian blur filter, a box filter, a motion blurfilter, etc. In some embodiments, a 3×3 Gaussian blur filter ω_(GB) isused for the edge smoothing operation, which may be expressed using thefollowing equation:

$\omega_{GB} = {\frac{1}{16}\begin{pmatrix}1 & 2 & 1 \\2 & 1 & 2 \\1 & 2 & 1\end{pmatrix}}$

In Block 650, an adjusted property mask is generated using a lookupoperation for one or more coarsening levels and/or one or morerefinement levels in accordance with one or more embodiments. Inparticular, continuous values within a property mask may be discretizedto correspond to different coarsening levels and/or different refinementlevels. In order to map the continuous values in a smoothed propertymask, for example, a reservoir simulator may use a lookup table thatdefines numerical ranges associated with coarsening and/or refinementlevels. The lookup table may use a linear uniform range, but morecomplex lookup tables are contemplated as well (e.g., logarithmicmapping tables).

In some embodiments, a reservoir simulator performs the discretizationusing a discretization function. In one example, the discretizationfunction may correspond to the following equation:

f(x)=|round(log₁₀ x+1.10^(−nlevels))|   Equation 4

Using a discretization function, the continuous values within a propertymask may be assigned to different coarsening/refinement levels. Equation4 may produce a mask discretization where max(f(x))=nlevels andmin(f(x))=0. In another example, a lookup function may be used todiscretize the values in the property mask. FIG. 7 is an example of alookup operation in accordance with one or more embodiments. In FIG. 7,an edge lookup function (750) is applied to image values within anadjusted property mask. Where the cell values fall within a continuousseries of image values (700), the edge lookup function (750) maydiscretize the image values (700) to determine various coarsening levels(i.e., no coarsening (710), coarsening level A (720), coarsening level B(730), and coarsening level C (740)). Likewise, the various ranges aredefined according to various image thresholds, i.e., image threshold A(721), image threshold B (731), and image threshold C (741).

Returning to FIG. 6, in Block 660, a coarsened grid model is generatedusing model data and LGR statements based on an adjusted property maskin accordance with one or more embodiments. After generating an adjustedproperty mask, a reservoir simulator may use the adjusted property maskto generate various LGR statements. Since the grid regions generated inan adjusted property mask may be irregular, LGR boxes may not fitperfectly at one or more of the higher levels of coarsening. For moreinformation regarding LGR statements, see FIG. 4 above and theaccompanying description as well as Block 540 in FIG. 5 and theaccompanying description.

In Block 670, a reservoir simulation is performed using a coarsened gridmodel in accordance with one or more embodiments. Block 670 may besimilar to Block 550 described above in FIG. 5 and the accompanyingdescription.

Turning to FIGS. 8A, 8B, and 8C, FIGS. 8A, 8B, and 8C provide an exampleof generating an adjusted property mask in accordance with one or moreembodiments. The following examples are for explanatory purposes onlyand not intended to limit the scope of the disclosed technology.

Turning to FIG. 8A, FIG. 8A illustrates an initial property mask A (800)that is the result of applying a predetermined threshold to model datafrom a fine-grid model for a reservoir region of interest. As shown inFIG. 8A, the initial property mask A (800) results in a patchinessquality where the threshold function produces several disconnected gridregions (e.g., disconnected grid region A (801) and disconnected gridregion B (802) are shown by circled regions of FIG. 8A). Turning to FIG.8B, FIG. 8B illustrates an expanded property mask B (810) that is theoutput of an expansion operation being applied to initial property maskA (800). As shown in FIG. 8B, the solid black shape forms the expandedproperty mask B (810), while the white regions outside the expandedproperty mask are intended for maximum coarsening. For example, areservoir simulator may apply one or more image filters to initialproperty mask A (800) to produce the expanded property mask B (810).This expanded property mask B (810) covers a larger area than thedisconnected grid regions in the initial property mask A (800) in orderto maintain the grid resolution of cells that may impact the reservoirproperty corresponding to the threshold function.

Turning to FIG. 8C, 8C illustrates an adjusted property mask (820) thatis the output of the expanded property mask B (810) after applying asmoothing operation and an edge lookup operation. In the adjustedproperty mask C (820), a non-coarsened grid region (805) corresponds tothe original cell resolution of the model data from a fine-grid model,while the transition zone (804) and the maximum coarsening region (806)are coarsened based on their respective coarsening levels. A reservoirsimulator may then use the adjusted property mask C (820) after a lookupoperation to generate a coarsened grid model for performing a reservoirsimulation.

System and Method for Automatic Local Grid Refinement UsingDecomposition Algorithms on Coarsening Masks

In general, embodiments of the disclosure include systems and methodsthat use various decomposition algorithms to reduce a total number ofLGR statements based on a multilevel coarsening mask. For example, areservoir simulator may use a decomposition algorithm during anautomated refinement/coarsening routine applied to a fine-grid model. Inparticular, a decomposition algorithm may describe a combinatorialprocess that decomposes 2D or 3D grid into various geometric shapes inorder minimize the total number of shapes necessary to describe acoarsening mask. For example, decomposition may be rectangulardecomposition that divides a grid into rectangular shapes of varioussizes, which may be similar to various processes used in imagecompression. Likewise, other types of decomposition are alsocontemplated such as graph-based decomposition.

To illustrate an example of a decomposition algorithm, an original gridregion with a size of 8×2 cells may be coarsened into a 4×1 grid regionusing 2×2 coarsening. The resulting grid may be expressed by thefollowing LGR statements with 2×2 coarsening:

-   -   LGR₁: 1 2 1 2 1 1    -   LGR₂: 3 4 1 2 1 1    -   LGR₃: 5 6 1 2 1 1    -   LGR₄: 7 8 1 2 1 1

Each of the above LGR statements represents a single coarsened gridblock of the final coarsened grid model. However, these four LGRstatements may also be described using an equivalent LGR objectstatement that is more compact than the original LGR statements. Forexample, an LGR object statement may define the different LGR statementsas a single rectangular array that includes four consecutive coarsenedgrid blocks. An example of an LGR object statement may be expressed bythe following statement:

-   -   LGR_(OPT): 1 8 1 2 4 1

From a geometric point of view, the above LGR object statement may beequivalent to determining a minimum number of rectangles of size L×W(length by width), where L and W may be multiples of an elementarycoarsening size (or 1 for refinement that corresponds to originalfine-grid cells). The process for generating and using LGR objectstatements will be described further in FIG. 9 below.

Turning to FIG. 9, FIG. 9 shows a flowchart in accordance with one ormore embodiments. Specifically, FIG. 9 describes a specific method forsimulating a reservoir region of interest using a coarsened grid modelbased on LGR object statements. One or more blocks in FIG. 9 may beperformed by one or more components (e.g., reservoir simulator (160)) asdescribed in FIGS. 1, 2B, and 4. While the various blocks in FIG. 9 arepresented and described sequentially, one of ordinary skill in the artwill appreciate that some or all of the blocks may be executed indifferent orders, may be combined or omitted, and some or all of theblocks may be executed in parallel. Furthermore, the blocks may beperformed actively or passively.

In Block 900, model data is obtained for a reservoir region of interestin accordance with one or more embodiments. Block 900 may be similar toBlock 500 described above in FIG. 5 and the accompanying description.

In Block 910, a multilevel coarsening mask is obtained based on modeldata in accordance with one or more embodiments. For example, themultilevel coarsening mask may be based on LGR statements that describeone or more coarsening levels for a coarsened grid model. For example, aseries of LGR statements may be included in a binary or ASCII file to beread by a reservoir simulator. This file may be the result of acoarsening algorithm or manually by a user. Different LGR statements maybe classified according to different coarsening levels in order togenerate a multilevel coarsening mask.

In some embodiments, the multilevel coarsening mask is generated using acoarsening algorithm. For example, a multilevel coarsening mask may bethe output of a property mask that is coarsened using a thresholdfunction applied to one or more reservoir properties within the modeldata. In some embodiments, the multilevel coarsening mask may be similarto the multilevel coarsening mask X (400) described above in FIG. 4 andthe accompanying description.

In Block 920, one or more binary masks are generated based on amultilevel coarsening mask in accordance with one or more embodiments.For example, a multilevel coarsening mask may be divided into separatebinary layers that correspond to different coarsening levels. For moreinformation on binary masks, see FIG. 4 above and the accompanyingdescription.

In Block 930, various LGR object statements are generated using one ormore decomposition algorithms and various binary masks in accordancewith one or more embodiments. In particular, a decomposition algorithmmay express a cellular array within a binary mask as a predeterminedobject shape, such as a rectangle, a square, a cubic volume as well asother geometric shapes. Furthermore, some examples of decompositionalgorithms may be based on run-length encoding (RLE), largest inscribedblock (LIB) decomposition, and graph-based decomposition (GBD). As such,a reservoir simulator may select one or more decomposition algorithmsbased on an amount of computational effort required to decompose aparticular binary mask. For example, if a user desires a quickdecomposition algorithm, an RLE process may be suggested to the user.After a binary mask is decomposed, the resulting geometric-shaped cellarrays may be used to generate various LGR object statements.

Turning to rectangular decomposition, a cell array within a binary maskmay be decomposed into an object that includes rows and/or columns. Inparticular, rectangular decomposition may produce coarsened grid blocksthat are continuous row segments. As such, the corresponding LGR objectstatement may store the coordinate of the beginning cell and the lengthof cells with respect to the cell array. In image compression, thistechnique is described as run-length encoding (RLE).

Keeping with rectangular decomposition, a rectangular decompositionalgorithm may be expressed using the following equation:

M=∪ _(i=1) ^(N) m _(i)   Equation 5

where m_(i) represents a rectangular partition and N is the number ofpartitions (N≥1), i correspond to a respective partition, M is theresult of the rectangular decomposition, and the blocks are notoverlapping. Rectangular decomposition may have a compression ratio γexpressed by the following equation:

$\begin{matrix}{\gamma = \frac{N}{N_{init}}} & {{Equation}\mspace{20mu} 6}\end{matrix}$

where N represents the number of rectangles after decomposition andN_(init) is the original number of LGR statements prior to performing adecomposition algorithm. Rectangular decomposition may be used in someembodiments because of the structured nature of the grid models found inreservoir simulations where a cell is described by a triplet withcoordinates in (i,j,k) dimensions. While various decomposition processesare described with respect to a two-dimensional grid model, similarembodiments may be extended to a three-dimensional model with multiplemodel layers as well.

Turning to LIB decomposition, LIB decomposition algorithms may search acell array for the largest block (e.g., a rectangle or a square) thatmay be inscribed within a binary mask. After determining the shape ofthe largest block, corresponding cell arrays may be removed fromconsideration that match the largest block. A decomposition algorithmmay repeat a search within a binary mask to determine additional LGRobject statements. Once the decomposition algorithm determines that nomore cells remain in the binary mask for coarsening, the decompositionalgorithm may end. An LIB decomposition algorithm may be different froma rectangular decomposition algorithm by selecting the largest objectshape for a coarsening block while generating LGR object statementsusing multiple different shapes.

Turning to graph-based decomposition (GBD), a graph-based decompositionalgorithm may partition a binary mask into cell arrays of specificpolygonal shapes, such as convex polygons, star-shaped polygons,triangles, generally oriented rectangles, etc. As such, a graph-baseddecomposition algorithm may solve a graph partitioning problem usingtools from graph theory. For example, a graph-based decompositionalgorithm may generate LGR object statements within a binary mask thatinclude uncoarsened holes.

Keeping with graph-based decomposition, vertices of a predeterminedobject may be divided into two groups: convex vertices that include aninner angle 90° and concave vertices that include an inner angle 270°.For example, a graph-based decomposition algorithm may use concavevertices to find the chords within a binary mask. Likewise, agraph-based decomposition algorithm may perform a hierarchicaldecomposition on two levels. On the first level, a graph-baseddecomposition algorithm may determine concave vertices within a binarymask and identify pairs of cogrid concave vertices (i.e. those havingthe same horizontal or vertical coordinates). Afterwards, thegraph-based decomposition algorithm divides the resulting object intosubpolygons by constructing chords which connect certain cogrid concavevertices. Accordingly, a graph-based decomposition algorithm maydetermine an optimal selection of chords within the binary mask, whichmay be equivalent to determining the maximal set of independent nodes ina graph.

In some embodiments, a reservoir simulator performs multipledecomposition algorithms on the same binary mask. Accordingly, based onthe resulting LGR object statements from the different decompositionalgorithms, a reservoir simulator may select which set of LGR statementsto use for a coarsened grid model. For example, the reservoir simulatormay compare the results of different decomposition algorithms based onvarious factors such as balancing cell array sizes among LGR objectstatements, limiting the size of the largest object shape, the totalnumber of LGR object statements, etc.

Turning to FIGS. 10, 11A, and 11B, FIGS. 10, 11A, and 11B provideexamples of generating LGR object statements using decompositionalgorithms in accordance with one or more embodiments. The followingexamples are for explanatory purposes only and not intended to limit thescope of the disclosed technology. In FIG. 10, various cell arrayswithin a binary mask (i.e., LGR cell array A (1011), LGR cell array B(1012), LGR cell array C (1013), LGR cell array D (1014)) are designatedfor coarsening. Where the four cell arrays (1011, 1012, 1013, 1014)typically correspond to four distinct LGR statements, a decompositionalgorithm X (1030) determines a single LGR object cell array X (1040)that includes all four cell arrays (1011, 1012, 1013, 1014). Inparticular, the LGR object cell array X (1040) correspond topredetermined object shape of a rectangle (1041). The LGR object cellarray X (1040) is subsequently transformed into an LGR object statementY (1050) that may be read by a reservoir simulator for generating acoarsened grid model.

In FIG. 11A, a reservoir simulator obtains a binary mask Q (1100) fordecomposition. The binary mask Q (1100) includes a binary object A(1110) that corresponds to a single coarsening level within a coarsenedgrid model. As shown in FIG. 11A, the binary object A (1110) includesseveral fine-grid regions (i.e., fine-grid region A (1111), fine-gridregion B (1112), fine-grid region C (1113)), which are excluded fromdecomposition. Thus, the reservoir simulator applies a decompositionalgorithm to the binary mask Q (1100), where a portion of thedecomposition algorithm's output is shown in FIG. 11B. In FIG. 11B, thecells in the binary mask Q (1100) around the fine-grid region B (1112)undergo rectangular decomposition that produces various LGR object cellarrays (e.g., LGR object cell array D (1141), LGR object cell array E(1142), LGR object cell array F (1143), LGR object cell array G (1144),LGR object cell array H (1145), LGR object cell array I (1146), LGRobject cell array J (1147)). Once the binary mask Q (1100) is decomposedfully into LGR object cell arrays, the LGR object cell arrays may beconverted into LGR object statements.

Returning to FIG. 9, in Block 950, a reservoir simulation is performedusing model data and a grid model based on various LGR object cellarrays in accordance with one or more embodiments. Block 950 may besimilar to Block 550 described above in FIG. 5 and the accompanyingdescription.

System and Method for Selecting Coarsening Scenarios for ReservoirSimulations

In preparation of a reservoir simulation, original groups of cellswithin a fine-grid model may be amalgamated together to producecoarsened grid blocks of different sizes. At the same coarsening levelwithin a coarsening mask, for example, a reservoir simulator maydetermine different arrangements of coarsened grid blocks. Inparticular, the actual arrangements may have an effect on the results ofa reservoir simulation, such as total computation time as well asaccuracy of the actual simulations. More specifically, less blocks in afinal grid model may result in less computations by the reservoirsimulator and consequently a faster turnaround time for each reservoirsimulation. Thus, an optimal arrangement of blocks that vary in size maybe determined using a combinatorial algorithm. This arrangement ofcoarsened grid blocks may be referred to as a coarsening scenario. Forexample, a coarsening scenario may include various individual blockarrangements of cell arrays that include 1×1, 2×2, etc. based on acoarsening mask. In particular, a coarsening scenario with fewercoarsened grid blocks may be advantageous over a coarsening scenariowith more coarsened grid blocks.

In some embodiments, a reservoir simulator may generate multiplecoarsening scenarios using one or more combinatorial algorithms, such asa greedy algorithm or dynamic programming algorithm. After comparingdifferent coarsening scenarios using one or more criteria, a reservoirsimulator or a user may select a particular coarsening scenario forgenerating a coarsened grid model for reservoir simulations.

Turning to FIG. 12, FIG. 12 shows a flowchart in accordance with one ormore embodiments. Specifically, FIG. 12 describes a specific method fordetermined a coarsening scenario for a reservoir grid model. One or moreblocks in FIG. 12 may be performed by one or more components (e.g.,reservoir simulator (160)) as described in FIGS. 1, 2B, and 4. While thevarious blocks in FIG. 12 are presented and described sequentially, oneof ordinary skill in the art will appreciate that some or all of theblocks may be executed in different orders, may be combined or omitted,and some or all of the blocks may be executed in parallel. Furthermore,the blocks may be performed actively or passively.

In Block 1200, model data is obtained for a reservoir region of interestin accordance with one or more embodiments. Block 1200 may be similar toBlock 500 described above in FIG. 5 and the accompanying description.

In Block 1210, a coarsening mask is obtained that describes one or morecoarsening levels within model data in accordance with one or moreembodiments. For example, the coarsening mask may be a multilevelcoarsening mask or a single level mask for generating a coarsened gridmodel. To illustrate this coarsening, aquifer regions may be selectedfor coarsening in a reservoir region of interest, whilehydrocarbon-bearing regions may have their resolution unchanged in thecoarsened grid model. In some embodiments, a coarsening mask isgenerated from a property mask. For more information on generating acoarsening mask from a property mask, see Block 610 above in FIG. 6 andthe accompanying description.

In Block 1220, a maximum coarsening level is determined for a coarseningmask in accordance with one or more embodiments. For example, areservoir simulator may obtain the maximum coarsening level from a useror as an attribute associated with a coarsening mask file. Using a valuefor the maximum coarsening level, a coarsening scenario may be generatedaccordingly in Blocks 1230-1250 below.

In some embodiments, a maximum coarsening level of a particular gridmodel is determined automatically by a reservoir simulator. For example,a reservoir simulator may initiate a search for the maximum coarseninglevel over the coarsening mask. Using a predetermined block size, thereservoir simulator may attempt to fit a coarsening block withinoriginal cells of the coarsening mask. After completing an iterationover each cell in the coarsening mask, the reservoir simulator mayreduce the predetermined block size and attempt to fit the updatedcoarsening grid block in the coarsening mask until the maximum blocksize is determined.

In Block 1230, an algorithm is selected for a coarsening scenario inaccordance with one or more embodiments. In particular, an optimalarrangement of blocks within a coarsened grid model may be viewed as acombinatorial optimization problem, such as Knapsack problem, a binpacking problem, or cutting stock problem. Multiple types of algorithms,such as combinatorial algorithms, may be selected that may includedifferent input parameters. In some embodiments, a reservoir simulatoruses a greedy algorithm and/or a dynamic programming algorithm todetermine a particular coarsening scenario with one or more desiredcharacteristics of the output arrangement.

Turning to greedy algorithms, greedy algorithms may include a class ofmathematical algorithms that determine a local optimal choice at eachstep in the algorithm when attempting to determine a global optimalsolution to a problem. As such, greedy algorithms may be susceptible toproviding solutions limited by local maxima. In contrast, the globaloptimal solution may not be a sum of various local optimal solutions.With respect to a coarsening scenario, a greedy algorithm may determinea starting location and a starting block size (e.g., maximum coarseninglevel) for searching a coarsening mask. The greedy algorithm may proceedto search the binary mask for a fit of the largest coarsened grid blockbeginning at multiple different starting locations. After determiningone coarsening scenario, a greedy algorithm may use a different blocksize to search the coarsening mask. Different starting locations andblock size may generate different block arrangements with differentnumbers of blocks.

Turning to dynamic programming algorithms, a dynamic programmingalgorithm may be a mathematical algorithm that divides a problem into acollection of smaller sub-problems. For example, a dynamic programmingalgorithm may solve a sub-problem only once and then store the solutionto the respective sub-problem in a table, thereby avoiding a computationof the solution again in the future. As such, a dynamic programmingalgorithm may determine a global solution based on multiple solutions ofsub-problems.

With respect to a coarsening scenario, a dynamic programming algorithmmay divide a coarsening mask into multiple smaller sub-grids. Aftersearching a particular sub-grid, a dynamic programming algorithm mayexpand the sub-grid in an X-direction and/or Y-direction to generate anew sub-grid for searching. The dynamic programming algorithm mayiteratively expand the sub-grid until a block arrangement is determinedfor a complete grid of a coarsening mask. In some embodiments, thedynamic programming algorithm may store a portion of a local solutiondetermined for the previous sub-grid for reuse in one or more subsequentsearches of expanded sub-grids. By backtracking and reusing previouslycalculated solutions, a dynamic programming algorithm may reducecomputational time and resources for determined a coarsening scenario.

In Block 1240, a coarsening scenario is generated based on a selectedalgorithm in accordance with one or more embodiments. Using a selectedalgorithm, a reservoir simulator may generate a coarsening scenariobased on the coarsening mask from Block 1210.

In Block 1245, a coarsening scenario is compared to one or more previouscoarsening scenarios in accordance with one or more embodiments. Forexample, a reservoir simulator may analyze a coarsening scenario forwhether a predetermined criterion, such as a specified threshold isexceeded by the coarsening scenario. Likewise, a reservoir simulator mayalso compare different coarsening scenarios based on coarsening ratiosbetween respective coarsening scenarios, the number of LGR statements orLGR object statements required to generate a coarsened grid model fromthe respective coarsening scenario, balance among block sizes, expectedsimulation runtime, etc.

In Block 1250, a determination is made whether a coarsening scenariosatisfies a predetermined criterion in accordance with one or moreembodiments. Using the comparison from Block 1245, for example, areservoir simulator may determine whether one or more predeterminedcriteria are satisfied. Examples of predetermined criteria may includecomputational time limits for generating a coarsened grid model, aspecific iteration limit on performing Blocks 1240-1260, and/or apercentage improvement over the previous coarsening scenarios. Forexample, a reservoir simulator may analyze the differences betweencoarsening scenarios to determine whether a coarsening scenarioparameter is converging to an optimum value.

If a predetermined criterion is not satisfied, a reservoir simulator maydetermine whether to perform one or more iterations of Blocks 1240-1260for optimizing the coarsening scenario for a coarsened grid model. Whena determination is made that at least one of the generated coarseningscenarios satisfies a predetermined criterion, the process may proceedto Block 1250. When a determination is made that none of the coarseningscenarios satisfy the predetermined criterion, the process may proceedto Block 1260.

In Block 1260, a different algorithm is selected in accordance with oneor more embodiments. For example, a different combinatorial algorithmmay be selected in a similar manner as described above in Block 1230. Inparticular, a reservoir simulator may reuse the same type of selectedalgorithm from the previous iteration with different parameters, e.g.,largest block size, starting location, or initial sub-grid with respectto a dynamic programming algorithm.

In Block 1270, a coarsened grid model is generated using various LGRstatements based on a final coarsening scenario in accordance with oneor more embodiments. More specifically, the final coarsening scenariomay be used to generate LGR statements and/or LGR object statements. Areservoir simulator may use these statements to generate a coarsenedgrid model accordingly. For more information on LGR statements and LGRobject statements, see FIGS. 4, 9, 10, 11A, and 11B above and theaccompanying description. In some embodiments, the final coarseningscenario includes the lowest number of LGR statements and/or LGR objectstatements among the coarsening scenarios determined in Blocks1230-1260, which may be advantageous for reservoir simulation users.

In Block 1280, a reservoir simulation is performed using a grid modelbased on model data and a coarsening scenario in accordance with one ormore embodiments. Block 1280 may be similar to Block 550 described abovein FIG. 5 and the accompanying description.

Turning to FIGS. 13A, 13B, 14A, and 14B, FIGS. 13A, 13B, 14A, and 14Bprovide examples of generating coarsening scenarios using combinatorialalgorithms in accordance with one or more embodiments. The followingexamples are for explanatory purposes only and not intended to limit thescope of the disclosed technology.

Turning to FIG. 13A, a reservoir simulator applies a combinatorialalgorithm X (1351) to various cells (i.e., cell A (1301), cell B (1302),cell C (1303), cell D (1304), cell E (1305), cell G (1306), cell H(1307), cell I (1308), cell J (1309), cell K (1310), cell L (1311), cellM (1312), cell N (1313), cell O (1314), cell P (1315), cell Q (1316))within a binary mask M (1371). In particular, the combinatorialalgorithm X (1351) is a type of greedy algorithm initially searches thebinary mask M (1371) using a 3×3 block size. After identifying thatblock A (1321) provides the only match to the 3×3 block size within thebinary mask M (1371), the combinatorial algorithm X (1351) performsanother search with a 2×2 block size. However, the combinatorialalgorithm X (1351) determines no matches according to this block size.Finally, the combinatorial algorithm X (1351) performs a search using a1×1 block size, which results in various blocks (i.e., block B (1322),block C (1323), block D (1324), block E (1325), block F (1326), block G(1327), block H (1328)). Thus, the resulting coarsening scenario A(1361) includes an arrangement of 8 total blocks.

Turning to FIG. 13B, a reservoir simulator applies a combinatorialalgorithm Y (1352) to the cells (1301, 1302, 1303, 1304, 1305, 1306,1307, 1308, 1309, 1310, 1311, 1312, 1313, 1314, 1315, 1316) within thebinary mask M (1371). Here, combinatorial algorithm Y (1352) is adifferent greedy algorithm than combinatorial algorithm X (1351) thatinitially searches the binary mask M (1371) using a 2×2 block sizeinstead of a 3×3 block size. As such, the combinatorial algorithm Y(1352) performs a single search with a 2×2 block size that results infour coarsened grid blocks (i.e., block L (1331), block M (1332), blockN (1333), block O (1334)). After the initial search, the combinatorialalgorithm Y (1352) determines the resulting coarsening scenario B (1362)includes an arrangement of 4 total blocks. Based on a comparison betweencoarsening scenario A (1361) and coarsening scenario (1362), a reservoirsimulator may determine that a particular coarsening scenario bettersatisfies a predetermined criterion, e.g., by comparing coarseningratios of the coarsening scenarios (1361, 1362).

Turning to FIG. 14A, FIG. 14A includes a dynamic programming algorithm Z(1490) generates an initial sub-grid A (1451) based on a binary mask(not shown). The initial sub-grid A (1451) includes noncoarsened cells(1421) with a resolution unchanged in a final coarsened grid model andvarious cells for coarsening (e.g., cell for coarsening (1422)). Afterperforming an initial search using a 2×2 block size, the dynamicprogramming algorithm C (1490) determines search results for a partialcoarsening scenario that includes various blocks (i.e., block A (1401),block B (1402), block C (1403), block D (1404), block E (1405), block F(1406), block G (1407), block H (1408)). After determining the searchresults for the initial sub-grid A (1451), the dynamic programmingalgorithm C (1451) determines an expanded sub-grid A (1452) withadditional cells (i.e., expansion (1423)). In particular, the searchresults for block A (1401), block B (1402), block D (1404), and block E(1405) may be reused based on the maximum coarsened cell size (i.e.,2×2) in this example. Likewise, with a maximum coarsened cell of 2×2 inone embodiment, any blocks that are farther than two blocks may bereused without a risk of obtaining a sub-optimal solution. However,block C (1403), block F (1406), block G (1407), block H (1408) may bediscarded as being less than 2 blocks away from the expansion (1423).

Turning to FIG. 14B, the dynamic programming algorithm C (1490) reusesblocks from the previous search, i.e., block A (1401), block B (1402),block D (1404), and block E (1405), in order to reduce the computationalload of the expanded search. By selecting different starting locations,the dynamic programming algorithm C (1490) determines two differentcoarsening scenarios, i.e., a coarsening scenario C (1461) and acoarsening scenario D (1462). In coarsening scenario C (1461), thedynamic programming algorithm C (1490) begins a search in the bottomleft corner of the expanded sub-grid A (1452) to determine a 2×2 block(i.e., block I (1409)). Afterwards, the dynamic programming algorithm C(1490) continues the search from the bottom left of the expandedsub-grid A (1452) until the search reaches the top right of the expandedsub-grid A (1452). In the end result of coarsening scenario C (1461),the dynamic programming algorithm C (1490) determines several additional2×2 blocks (i.e., block J (1410), block K (1411), block L (1412)) forthe coarsening scenario C (1461) along with various 1×1 cells.

Keeping with FIG. 14B, in coarsening scenario D (1462), the dynamicprogramming algorithm C (1490) begins a search in the expanded sub-gridA (1452) at the cells adjacent to block B (1402) to determine a 2×2block (i.e., block I (1409)). Afterwards, the dynamic programmingalgorithm C (1490) performs a search for another 2×2 block along theright side perimeter of the expanded sub-grid A (1452). The dynamicprogramming algorithm C (1490) subsequently determines four additional2×2 blocks (i.e., block N (1414), block O (1415), block P (1416), blockQ (1417)) for the coarsening scenario D (1462) along with various 1×1cells. Thus, the resulting coarsening scenario D (1462) results in fewertotal blocks than coarsening scenario D (1461). Therefore, a reservoirsimulator selects coarsening scenario D (1462) over coarsening scenarioC (1461) based on comparing coarsening ratios of the coarseningscenarios (1461, 1462).

Turning to FIG. 14C, the dynamic programming algorithm C (1490) reusesall blocks from the previous search, i.e., block A (1401), block B(1402), block D (1404), and block E (1405), etc. in coarsening scenarioE (1463). Accordingly, no cells from the expansion (1423) are coarsenedin this coarsening scenario.

System and Method for Flow-Based Coarsening of Reservoir Grid Models

In order to reduce computational time, a coarsened grid model may begenerated from a fine-grid model. In general, it is safer to coarsencells that do not contribute to a total flow of a reservoir region,because a slight change on reservoir properties, i.e. permeability,porosity or saturations, may impact reservoir simulations. Accordingly,flow properties may be determined for a reservoir region of interestusing streamlines. In particular, the streamlines described above inFIG. 3 and the accompanying description may provide the basis for anautomated workflow for generating and/or verifying a coarsened gridmodel.

Turning to FIG. 15, FIG. 15 shows a flowchart in accordance with one ormore embodiments. Specifically, FIG. 15 describes a specific method forperforming a reservoir simulation using a well assignment. One or moreblocks in FIG. 15 may be performed by one or more components (e.g.,reservoir simulator (160)) as described in FIGS. 1, 2B, and 4. While thevarious blocks in FIG. 15 are presented and described sequentially, oneof ordinary skill in the art will appreciate that some or all of theblocks may be executed in different orders, may be combined or omitted,and some or all of the blocks may be executed in parallel. Furthermore,the blocks may be performed actively or passively.

In Block 1500, model data is obtained for a reservoir region of interestin accordance with one or more embodiments. Block 1500 may be similar toBlock 500 described above in FIG. 5 and the accompanying description.

In Block 1510, various streamlines are determined using a reservoirsimulation and model data in accordance with one or more embodiments.For example, a reservoir simulator may generate various streamlines forthe reservoir region of interest similar to the streamlines Z (320)described above in FIG. 3 and the accompanying description.

In Block 1520, flow property data is determined using variousstreamlines in accordance with one or more embodiments. For example,flow property data may be dynamic data that describes various reservoirconnections within a reservoir region of interest. In some embodiments,the flow property data includes time of flight (TOF) informationregarding one or more streamlines. More specifically, TOF informationmay describe a particle travel time along a streamline within thereservoir region of interest. A shorter travel time of the particle maycorrespond to a stronger reservoir connection, while a longer traveltime may correspond to a weaker reservoir connection. Thus, a reservoirsimulator may use streamlines in a particular simulation period todetermine one or more dynamic flow property values. Likewise, flowproperty data may be discretized flow information outputted fromstreamline tracing software, such as a flux value file obtained afterperforming a streamline simulation.

In Block 1530, a multilevel coarsening mask is generated based on flowproperty data in accordance with one or more embodiments. In someembodiments, for example, a multilevel coarsening mask is generatedusing TOF information. For example, TOF information throughout areservoir region of interest may provide a coarsening weight fordetermining various coarsening levels in a coarsened grid model. In someembodiments, a reservoir simulator may use flow property data withstatic reservoir properties to determine coarsening levels. Examples ofstatic reservoir properties may include well-to-well correlations, rockproperties, pressure gradients, oil-water contact interfaces, fluidproperties, etc. To generate a multilevel coarsening mask, the flowproperty data may be inputted into one or more coarsening algorithmsbased on flow information. For example, a coarsening level may be basedon a magnitude of a flow property value. A lower flow property value maycorrespond to a higher amount of coarsening. As such, a coarseningalgorithm may transform a flow property mask into a multilevelcoarsening mask. Likewise, a coarsening algorithm may use flow propertydata to generate one or more binary mask. In some embodiments, acoarsening algorithm includes a coarsening lookup function.

Turning to FIG. 16, FIG. 16 shows an example of a coarsening lookupfunction in accordance with one or more embodiments. In FIG. 16, acoarsening lookup function (1600) uses time of flight values (1690) todetermine various coarsening levels (i.e., no coarsening (1610),coarsening level A (1620), coarsening level B (1630), coarsening level C(1630)). For example, the time of flight values (1690) may be acontinuous set of values that are discretized based on different valueranges. The coarsening lookup function (1600) may be a linear function,logarithmic function, exponential function, etc. These values rangescorrespond accordingly to different levels of coarsening. In someembodiments, the coarsening levels (1610, 1620, 1630, 1640) may be basedon user-defined thresholds. This approach naturally creates a smoothtransition zone between coarsening levels, this helps to minimizingdiscretization errors arising for non-orthogonal cells in a two-pointflux approximation. Moreover, the coarsening lookup function (1600) maybe similar to the edge coarsening lookup function (750) described abovein FIG. 7 and the accompanying description.

Returning to FIG. 15, in Block 1540, a coarsened grid model is generatedusing a multilevel mask in accordance with one or more embodiments. Forexample, a reservoir simulator may generate a coarsened grid model basedon the reservoir region of interest similar to the coarsened grid modelgenerated in Block 540 described above in FIG. 5 and the accompanyingdescription.

In Block 1550, a reservoir simulation is performed using a coarsenedgrid model in accordance with one or more embodiments. Block 1550 may besimilar to Block 550 described above in FIG. 5 and the accompanyingdescription.

In Block 1555, one or more reservoir simulations based on a coarsenedgrid model are compared with one or more reservoir simulations based ona fine-grid model in accordance with one or more embodiments. Forexample, a reservoir simulator may perform a quality check on thecoarsened grid model in Block 1560 and again in Block 1580 below. Morespecifically, reservoir simulation results from the coarsened grid modelmay be tested against a fine-grid model to confirm whether the coarsenedgrid model satisfies an accuracy threshold or other criterion. Likewise,simulations from different coarsened grid models may also be compared.

In Block 1560, a determination is made whether a coarsened grid modelsatisfies a predetermined criterion in accordance with one or moreembodiments. Using the comparison from Block 1555, for example, areservoir simulator may determine the difference between the coarsenedgrid model and a fine-grid model. Furthermore, the predeterminedcriterion may be a specified accuracy threshold to determine whether themismatch between the coarsened grid model and a fine-grid model isoutside a specific tolerance. When a determination is made that thecoarsened grid model satisfies the predetermined criterion, the processmay proceed to Block 1570. When a determination is made that thecoarsened grid model fails to satisfy the predetermined criterion, theprocess may proceed to Block 1565.

In Block 1565, a multilevel coarsening mask is adjusted in accordancewith one or more embodiments. For example, thresholds in a coarseninglookup function may be adjusted to increase a match between thecoarsened grid model and a fine-grid model. Likewise, the number ofcoarsened levels in the multilevel coarsening mask may be modified toreduce the amount of discretization error in the coarsened grid model.After adjusting the multilevel coarsening mask, Blocks 1540-1560 may berepeated to determine whether a new coarsened grid model satisfied thepredetermined criterion at Block 1560.

In Block 1570, a final coarsened grid model is analyzed using one ormore reservoir simulation studies in accordance with one or moreembodiments. The final coarsened grid model may be the coarsened gridmodel output from Block 1560. In some embodiments, one or morecomparisons are performed with the final coarsened grid model to verifysimulation accuracy. Likewise, the comparisons may include performingvarious multi-realization studies such as history matching to verify thefinal coarsened grid model. History matching may include the process ofcalibrating the final coarsened grid model to match acquired reservoirdata, such as well log data, coring data, or seismic data. Historymatching may be performed over multiple iterations that fine-tune modelparameters based on repeated comparisons between the coarsened gridmodel and the acquired reservoir data.

In Block 1580, a final coarsened grid model is verified in accordancewith one or more embodiments. This verification provides an additionallevel to confirm by a reservoir simulator whether the final coarsenedgrid model has sufficient accuracy. When a determination is made thatthe coarsened grid model is verified using one or more reservoirsimulation studies, the process may end. When a determination is madethat the coarsened grid model fails the verification, the process mayproceed to Block 1585.

In Block 1585, streamlines are adjusted in accordance with one or moreembodiments. In particular, streamlines may be simulated again in ordergenerate updated flow property data for generating another multilevelcoarsening mask.

Turning to FIGS. 17A, 17B, and 17C, FIGS. 17A, 17B, and 17C provide anexample of generating a coarsening grid model using flow property datain accordance with one or more embodiments. The following example is forexplanatory purposes only and not intended to limit the scope of thedisclosed technology.

In FIG. 17A, a reservoir simulator uses a streamline simulation function(1760) to obtain a flow property data file B (1720) from a fine-gridmodel (1710) for reservoir X. In particular, the streamline simulationfunction (1760) uses dynamic property data (1711) and static propertydata (1712) to map streamlines within reservoir X. Multiple streamlinefiles are generated that represent different periods during thesimulation, which may be combined into a single graph representingconnectivity as a static property. Therefore, the files may bepreprocessed to generate a single property file. One embodiment may use,for any given cell, the value representing the strongest connectivity atany given time (minimum TOF). This, however, can be experimented with,and the most optimal combination may be found. Thus, the output ofvarious streamline simulations is a flow property data file B (1720)that includes time of flight data (1721). Next, the reservoir simulatorapplies a coarsening lookup function F (1770) to the time of flight data(1721) to generate an initial multilevel coarsening mask C (1730) thatincludes two coarsening levels, i.e., coarsening level A (1731) andcoarsening level B (1732). From the initial multilevel coarsening mask C(1730), the reservoir simulator proceeds to generate a reservoircoarsened grid model A (1740) using model data from the fine-grid model(1710) for reservoir X. Afterwards, the reservoir coarsened grid model(1740) is used to generate reservoir simulations (e.g., reservoirsimulations X (1745)).

In FIG. 17B, the initial multilevel coarsening mask C (1730) is verifiedbased on the reservoir simulations X (1745). More specifically, areservoir simulator (1750) uses a simulation comparison function (1750)to compare the reservoir simulations X (1745) with reservoir simulations(i.e., reservoir simulations Z (1715)) produce by the fine-grid model(1710) for reservoir X. However, based on results of the simulationcomparison function (1750), the coarsened grid model A (1740) and thusthe initial multilevel coarsening mask C (1730) fail to satisfy acriterion Z (1781).

In FIG. 17C, a reservoir simulator modifies the initial multilevelcoarsening mask C (1730) to produce an adjusted multilevel coarseningmask C (1735). For example, the adjusted multilevel coarsening mask C(1735) may have different coarsening levels or arrangements of coarsenedgrid blocks than the initial multilevel coarsening mask C (1730).Another coarsened grid model (i.e., reservoir coarsened grid model B(1741) is generated using the adjusted multilevel coarsening mask C(1735). The reservoir simulator again uses the simulation comparisonfunction (1750) on reservoir simulations (i.e., reservoir simulations Y(1746)) based on the reservoir coarsened grid model B (1741) and thereservoir simulations Z (1715) from the fine-grid model (1710). Here,the reservoir coarsened grid model B (1741) satisfies criterion Z(1781).

Computing System

Embodiments may be implemented on a computing system. Any combination ofmobile, desktop, server, router, switch, embedded device, or other typesof hardware may be used. For example, as shown in FIG. 18, the computingsystem (1800) may include one or more computer processors (1802),non-persistent storage (1804) (e.g., volatile memory, such as randomaccess memory (RAM), cache memory), persistent storage (1806) (e.g., ahard disk, an optical drive such as a compact disk (CD) drive or digitalversatile disk (DVD) drive, a flash memory, etc.), a communicationinterface (1812) (e.g., Bluetooth interface, infrared interface, networkinterface, optical interface, etc.), and numerous other elements andfunctionalities.

The computer processor(s) (1802) may be an integrated circuit forprocessing instructions. For example, the computer processor(s) may beone or more cores or micro-cores of a processor. The computing system(1800) may also include one or more input devices (1810), such as atouchscreen, keyboard, mouse, microphone, touchpad, electronic pen, orany other type of input device.

The communication interface (1812) may include an integrated circuit forconnecting the computing system (1800) to a network (not shown) (e.g., alocal area network (LAN), a wide area network (WAN) such as theInternet, mobile network, or any other type of network) and/or toanother device, such as another computing device.

Further, the computing system (1800) may include one or more outputdevices (1808), such as a screen (e.g., a liquid crystal display (LCD),a plasma display, touchscreen, cathode ray tube (CRT) monitor,projector, or other display device), a printer, external storage, or anyother output device. One or more of the output devices may be the sameor different from the input device(s). The input and output device(s)may be locally or remotely connected to the computer processor(s)(1802), non-persistent storage (1804), and persistent storage (1806).Many different types of computing systems exist, and the aforementionedinput and output device(s) may take other forms.

Software instructions in the form of computer readable program code toperform embodiments of the disclosure may be stored, in whole or inpart, temporarily or permanently, on a non-transitory computer readablemedium such as a CD, DVD, storage device, a diskette, a tape, flashmemory, physical memory, or any other computer readable storage medium.Specifically, the software instructions may correspond to computerreadable program code that, when executed by a processor(s), isconfigured to perform one or more embodiments of the disclosure.

The computing system or group of computing systems described in FIG. 18may include functionality to perform a variety of operations disclosedherein. For example, the computing system(s) may perform communicationbetween processes on the same or different systems. A variety ofmechanisms, employing some form of active or passive communication, mayfacilitate the exchange of data between processes on the same device.Examples representative of these inter-process communications include,but are not limited to, the implementation of a file, a signal, asocket, a message queue, a pipeline, a semaphore, shared memory, messagepassing, and a memory-mapped file. Further details pertaining to acouple of these non-limiting examples are provided below.

Based on the client-server networking model, sockets may serve asinterfaces or communication channel end-points enabling bidirectionaldata transfer between processes on the same device. Foremost, followingthe client-server networking model, a server process (e.g., a processthat provides data) may create a first socket object. Next, the serverprocess binds the first socket object, thereby associating the firstsocket object with a unique name and/or address. After creating andbinding the first socket object, the server process then waits andlistens for incoming connection requests from one or more clientprocesses (e.g., processes that seek data). At this point, when a clientprocess wishes to obtain data from a server process, the client processstarts by creating a second socket object. The client process thenproceeds to generate a connection request that includes at least thesecond socket object and the unique name and/or address associated withthe first socket object. The client process then transmits theconnection request to the server process. Depending on availability, theserver process may accept the connection request, establishing acommunication channel with the client process, or the server process,busy in handling other operations, may queue the connection request in abuffer until the server process is ready. An established connectioninforms the client process that communications may commence. Inresponse, the client process may generate a data request specifying thedata that the client process wishes to obtain. The data request issubsequently transmitted to the server process. Upon receiving the datarequest, the server process analyzes the request and gathers therequested data. Finally, the server process then generates a replyincluding at least the requested data and transmits the reply to theclient process. The data may be transferred, more commonly, as datagramsor a stream of characters (e.g., bytes).

Shared memory refers to the allocation of virtual memory space in orderto substantiate a mechanism for which data may be communicated and/oraccessed by multiple processes. In implementing shared memory, aninitializing process first creates a shareable segment in persistent ornon-persistent storage. Post creation, the initializing process thenmounts the shareable segment, subsequently mapping the shareable segmentinto the address space associated with the initializing process.Following the mounting, the initializing process proceeds to identifyand grant access permission to one or more authorized processes that mayalso write and read data to and from the shareable segment. Changes madeto the data in the shareable segment by one process may immediatelyaffect other processes, which are also linked to the shareable segment.Further, when one of the authorized processes accesses the shareablesegment, the shareable segment maps to the address space of thatauthorized process. Often, one authorized process may mount theshareable segment, other than the initializing process, at any giventime.

Other techniques may be used to share data, such as the various datadescribed in the present application, between processes withoutdeparting from the scope of the disclosure. The processes may be part ofthe same or different application and may execute on the same ordifferent computing system.

Rather than or in addition to sharing data between processes, thecomputing system performing one or more embodiments of the disclosuremay include functionality to receive data from a user. For example, inone or more embodiments, a user may submit data via a graphical userinterface (GUI) on the user device. Data may be submitted via thegraphical user interface by a user selecting one or more graphical userinterface widgets or inserting text and other data into graphical userinterface widgets using a touchpad, a keyboard, a mouse, or any otherinput device. In response to selecting a particular item, informationregarding the particular item may be obtained from persistent ornon-persistent storage by the computer processor. Upon selection of theitem by the user, the contents of the obtained data regarding theparticular item may be displayed on the user device in response to theuser's selection.

By way of another example, a request to obtain data regarding theparticular item may be sent to a server operatively connected to theuser device through a network. For example, the user may select auniform resource locator (URL) link within a web client of the userdevice, thereby initiating a Hypertext Transfer Protocol (HTTP) or otherprotocol request being sent to the network host associated with the URL.In response to the request, the server may extract the data regardingthe particular selected item and send the data to the device thatinitiated the request. Once the user device has received the dataregarding the particular item, the contents of the received dataregarding the particular item may be displayed on the user device inresponse to the user's selection. Further to the above example, the datareceived from the server after selecting the URL link may provide a webpage in Hyper Text Markup Language (HTML) that may be rendered by theweb client and displayed on the user device.

Once data is obtained, such as by using techniques described above orfrom storage, the computing system, in performing one or moreembodiments of the disclosure, may extract one or more data items fromthe obtained data. For example, the extraction may be performed asfollows by the computing system (1800) in FIG. 18. First, the organizingpattern (e.g., grammar, schema, layout) of the data is determined, whichmay be based on one or more of the following: position (e.g., bit orcolumn position, Nth token in a data stream, etc.), attribute (where theattribute is associated with one or more values), or a hierarchical/treestructure (consisting of layers of nodes at different levels ofdetail—such as in nested packet headers or nested document sections).Then, the raw, unprocessed stream of data symbols is parsed, in thecontext of the organizing pattern, into a stream (or layered structure)of tokens (where each token may have an associated token “type”).

Next, extraction criteria are used to extract one or more data itemsfrom the token stream or structure, where the extraction criteria areprocessed according to the organizing pattern to extract one or moretokens (or nodes from a layered structure). For position-based data, thetoken(s) at the position(s) identified by the extraction criteria areextracted. For attribute/value-based data, the token(s) and/or node(s)associated with the attribute(s) satisfying the extraction criteria areextracted. For hierarchical/layered data, the token(s) associated withthe node(s) matching the extraction criteria are extracted. Theextraction criteria may be as simple as an identifier string or may be aquery presented to a structured data repository (where the datarepository may be organized according to a database schema or dataformat, such as XML).

The extracted data may be used for further processing by the computingsystem. For example, the computing system of FIG. 18, while performingone or more embodiments of the disclosure, may perform data comparison.Data comparison may be used to compare two or more data values (e.g., A,B). For example, one or more embodiments may determine whether A>B, A=B,A!=B, A<B, etc. The comparison may be performed by submitting A, B, andan opcode specifying an operation related to the comparison into anarithmetic logic unit (ALU) (i.e., circuitry that performs arithmeticand/or bitwise logical operations on the two data values). The ALUoutputs the numerical result of the operation and/or one or more statusflags related to the numerical result. For example, the status flags mayindicate whether the numerical result is a positive number, a negativenumber, zero, etc. By selecting the proper opcode and then reading thenumerical results and/or status flags, the comparison may be executed.For example, in order to determine if A>B, B may be subtracted from A(i.e., A−B), and the status flags may be read to determine if the resultis positive (i.e., if A>B, then A−B>0). In one or more embodiments, Bmay be considered a threshold, and A is deemed to satisfy the thresholdif A=B or if A>B, as determined using the ALU. In one or moreembodiments of the disclosure, A and B may be vectors, and comparing Awith B includes comparing the first element of vector A with the firstelement of vector B, the second element of vector A with the secondelement of vector B, etc. In one or more embodiments, if A and B arestrings, the binary values of the strings may be compared.

The computing system in FIG. 18 may implement and/or be connected to adata repository. For example, one type of data repository is a database.A database is a collection of information configured for ease of dataretrieval, modification, re-organization, and deletion. DatabaseManagement System (DBMS) is a software application that provides aninterface for users to define, create, query, update, or administerdatabases.

The user, or software application, may submit a statement or query intothe DBMS. Then the DBMS interprets the statement. The statement may be aselect statement to request information, update statement, createstatement, delete statement, etc. Moreover, the statement may includeparameters that specify data, or data container (database, table,record, column, view, etc.), identifier(s), conditions (comparisonoperators), functions (e.g. join, full join, count, average, etc.), sort(e.g. ascending, descending), or others. The DBMS may execute thestatement. For example, the DBMS may access a memory buffer, a referenceor index a file for read, write, deletion, or any combination thereof,for responding to the statement. The DBMS may load the data frompersistent or non-persistent storage and perform computations to respondto the query. The DBMS may return the result(s) to the user or softwareapplication.

The computing system of FIG. 18 may include functionality to present rawand/or processed data, such as results of comparisons and otherprocessing. For example, presenting data may be accomplished throughvarious presenting methods. Specifically, data may be presented througha user interface provided by a computing device. The user interface mayinclude a GUI that displays information on a display device, such as acomputer monitor or a touchscreen on a handheld computer device. The GUImay include various GUI widgets that organize what data is shown as wellas how data is presented to a user. Furthermore, the GUI may presentdata directly to the user, e.g., data presented as actual data valuesthrough text, or rendered by the computing device into a visualrepresentation of the data, such as through visualizing a data model.

For example, a GUI may first obtain a notification from a softwareapplication requesting that a particular data object be presented withinthe GUI. Next, the GUI may determine a data object type associated withthe particular data object, e.g., by obtaining data from a dataattribute within the data object that identifies the data object type.Then, the GUI may determine any rules designated for displaying thatdata object type, e.g., rules specified by a software framework for adata object class or according to any local parameters defined by theGUI for presenting that data object type. Finally, the GUI may obtaindata values from the particular data object and render a visualrepresentation of the data values within a display device according tothe designated rules for that data object type.

Data may also be presented through various audio methods. In particular,data may be rendered into an audio format and presented as sound throughone or more speakers operably connected to a computing device.

Data may also be presented to a user through haptic methods. Forexample, haptic methods may include vibrations or other physical signalsgenerated by the computing system. For example, data may be presented toa user using a vibration generated by a handheld computer device with apredefined duration and intensity of the vibration to communicate thedata.

The above description of functions presents only a few examples offunctions performed by the computing system of FIG. 18. Other functionsmay be performed using one or more embodiments of the disclosure.

Although only a few example embodiments have been described in detailabove, those skilled in the art will readily appreciate that manymodifications are possible in the example embodiments without materiallydeparting from this invention. Accordingly, all such modifications areintended to be included within the scope of this disclosure as definedin the following claims. In the claims, any means-plus-function clausesare intended to cover the structures described herein as performing therecited function(s) and equivalents of those structures. Similarly, anystep-plus-function clauses in the claims are intended to cover the actsdescribed here as performing the recited function(s) and equivalents ofthose acts. It is the express intention of the applicant not to invoke35 U.S.C. § 112(f) for any limitations of any of the claims herein,except for those in which the claim expressly uses the words “means for”or “step for” together with an associated function.

What is claimed:
 1. A method, comprising: obtaining, by a computerprocessor, model data for a reservoir region of interest, wherein themodel data comprises flow property data based on streamlines;generating, by the computer processor, a multilevel coarsening maskdescribing a plurality coarsening levels that correspond to differentflow values among the flow property data; generating, by the computerprocessor, a first coarsened grid model using the model data and themultilevel coarsening mask; and performing, by the computer processor, afirst reservoir simulation of the reservoir region of interest using thefirst coarsened grid model.
 2. The method of claim 1, furthercomprising: performing a second reservoir simulation of the reservoirregion of interest using a fine-grid model comprising the model data;and determining a plurality of streamlines within the reservoir regionof interest using the second reservoir simulation, wherein the flowproperty data is determined from the plurality of streamlines.
 3. Themethod of claim 1, further comprising: performing a second reservoirsimulation of the reservoir region of interest using a fine-grid modelcomprising the model data; and comparing the first reservoir simulationto the second reservoir simulation to produce a comparison; adjustingthe multilevel coarsening mask using the comparison to produce anadjusted multilevel coarsening mask; and generating a second coarsenedgrid model using the model data and the adjusted multilevel coarseningmask.
 4. The method of claim 1, wherein the multilevel coarsening maskis determined using a lookup table describing a plurality of coarseningvalues based on predetermined ranges of flow rate property values, andwherein the multilevel coarsening mask is an integer mask.
 5. The methodof claim 1, further comprising: performing a second reservoir simulationof the reservoir region of interest using a fine-grid model comprisingthe model data; and comparing the first reservoir simulation to thesecond reservoir simulation to produce a comparison; updating theplurality of streamlines using the comparison to produce an updatedplurality of streamlines; and generating a second coarsened grid modelusing the model data and an updated multilevel coarsening mask based onthe updated plurality of streamlines.
 6. A method of claim 1, whereinthe multilevel coarsening mask is an adjusted property mask comprising asmoothed grid region, and wherein the smoothed grid region is producedby performing an edge smoothing operation to an expanded grid region. 7.A method of claim 1, wherein the first coarsened grid model is generatedusing a plurality of local grid refinement and coarsening (LGR) objectstatements that are determined using a decomposition algorithm and oneor more binary masks.
 8. A method of claim 1, wherein the firstcoarsened grid model is based on a coarsening scenario generated using acombinatorial algorithm.
 9. A computer system, comprising: a processor;and a memory coupled to the processor, the memory comprisingfunctionality for: obtaining model data for a reservoir region ofinterest, wherein the model data comprises flow property data based onstreamlines; generating a multilevel coarsening mask describing aplurality coarsening levels that correspond to different flow valuesamong the flow property data; generating a first coarsened grid modelusing the model data and the multilevel coarsening mask; and performinga first reservoir simulation of the reservoir region of interest usingthe first coarsened grid model.
 10. The computer system of claim 9,wherein the memory further comprises functionality for: performing asecond reservoir simulation of the reservoir region of interest using afine-grid model comprising the model data; and determining a pluralityof streamlines within the reservoir region of interest using the secondreservoir simulation, wherein the flow property data is determined fromthe plurality of streamlines.
 11. The computer system of claim 9,wherein the memory further comprises functionality for: performing asecond reservoir simulation of the reservoir region of interest using afine-grid model comprising the model data; and comparing the firstreservoir simulation to the second reservoir simulation to produce acomparison; adjusting the multilevel coarsening mask using thecomparison to produce an adjusted multilevel coarsening mask; andgenerating a second coarsened grid model using the model data and theadjusted multilevel coarsening mask.
 12. The computer system of claim 9,wherein the multilevel coarsening mask is determined using a lookuptable describing a plurality of coarsening values based on predeterminedranges of flow rate property values, and wherein the multilevelcoarsening mask is an integer mask.
 13. The computer system of claim 9,wherein the memory further comprises functionality for: performing asecond reservoir simulation of the reservoir region of interest using afine-grid model comprising the model data; and comparing the firstreservoir simulation to the second reservoir simulation to produce acomparison; updating the plurality of streamlines using the comparisonto produce an updated plurality of streamlines; and generating a secondcoarsened grid model using the model data and an updated multilevelcoarsening mask based on the updated plurality of streamlines.
 14. Thecomputer system of claim 9, wherein the multilevel coarsening mask is anadjusted property mask comprising a smoothed grid region, and whereinthe smoothed grid region is produced by performing an edge smoothingoperation to an expanded grid region.
 15. A non-transitory computerreadable medium storing instructions executable by a computer processor,the instructions comprising functionality for: obtaining model data fora reservoir region of interest, wherein the model data comprises flowproperty data based on streamlines; generating a multilevel coarseningmask describing a plurality coarsening levels that correspond todifferent flow values among the flow property data; generating a firstcoarsened grid model using the model data and the multilevel coarseningmask; and performing a first reservoir simulation of the reservoirregion of interest using the first coarsened grid model.
 16. Thenon-transitory computer readable medium of claim 15, wherein themultilevel coarsening mask is an adjusted property mask comprising asmoothed grid region, and wherein the smoothed grid region is producedby performing an edge smoothing operation to an expanded grid region.17. The non-transitory computer readable medium of claim 15, wherein thefirst coarsened grid model is generated using a plurality of local gridrefinement and coarsening (LGR) object statements that are determinedusing a decomposition algorithm and one or more binary masks.
 18. Thenon-transitory computer readable medium of claim 15, wherein the firstcoarsened grid model is based on a coarsening scenario generated using acombinatorial algorithm.
 19. The non-transitory computer readable mediumof claim 15, wherein the instructions further comprise functionalityfor: performing a second reservoir simulation of the reservoir region ofinterest using a fine-grid model comprising the model data; anddetermining a plurality of streamlines within the reservoir region ofinterest using the second reservoir simulation, wherein the flowproperty data is determined from the plurality of streamlines.
 20. Thenon-transitory computer readable medium of claim 15, wherein theinstructions further comprise functionality for: performing a secondreservoir simulation of the reservoir region of interest using afine-grid model comprising the model data; and comparing the firstreservoir simulation to the second reservoir simulation to produce acomparison; adjusting the multilevel coarsening mask using thecomparison to produce an adjusted multilevel coarsening mask; andgenerating a second coarsened grid model using the model data and theadjusted multilevel coarsening mask.